package javawdw.security.service;

import javawdw.security.spi.IService;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.sun.jersey.spi.resource.Singleton;

@Singleton
@Path("/setting")
@Produces(MediaType.APPLICATION_JSON)
public class SettingRs extends IService {
	@GET
	@Path("getCurrentUser")
	@Transactional(propagation = Propagation.REQUIRED)
	public UserDetails getCurrentUser() {
		return super.getCurrentUser();
	}
}